<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title> 实验报告 - Cloud Lab</title>

    <!--引入css-->
    <link rel="shortcut icon" href="../img/logo_img.png">
    <link rel="stylesheet" href="../static/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="../static/highlight.js/9.8.0/monokai-sublime.min.css">
    <link rel="stylesheet" href="../app/css/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="../app/css/libs/katex/0.6.0/katex.min.css">
    <link rel="stylesheet" href="../app/css/libs/videojs/5.11.7/video-js.min.css">
    <link rel="stylesheet" href="../app/css/dest/styles.css?=2016121272249">
    <link rel="stylesheet" href="../app/css/libs/katex/0.6.0/katex.min.css">

    <style>
        .invite-friends-link input {
            margin-left:-5px;
        }
        .invite-friends-link button {
            float:left;
            margin-top:5px;
            margin-left:-5px;
        }
        p.join-vip-faq img {
            height:13px;
            width:13px;
            margin-top:-2px;
        }
    </style>
</head>

<body>
<!--网页顶部 导航栏-->
<script src="../model/topHtmlExpectIndex.js"></script>

<div class="container layout layout-margin-top">
    <ol class="breadcrumb">
        <li><a href="../experimental_report/index.html">我的课程</a></li>
        <li id="courseURL">
        </li>
        <li id="experimentalNameHref">
        </li>
        <li class="active" id="experimentalReportNameHref">
        </li>
    </ol>
    <div class="row">
        <div class="col-md-9 layout-body">
            <div class="side-image side-image-mobile">
                <img src="https://dn-simplecloud.shiyanlou.com/ncn1.jpg?imageView2/0/h/300" id="courseImgMobile">
            </div>
            <div class="content course-infobox">
                <div class="clearfix course-infobox-header">
                    <h4 class="pull-left course-infobox-title">

                        <span id="courseName">------</span>

                    </h4>

                </div>
                <div class="clearfix course-infobox-body">
                    <div class="course-infobox-content">
                        <p id="courseDescription">------</p>
                    </div>
                    <div class="pull-right course-infobox-price">

                    </div>

                </div>
                <div class="clearfix course-infobox-footer">

                    <div class="pull-right course-infobox-learned">创建时间：<span id="courseCreateTime"></span>&nbsp;&nbsp;&nbsp;&nbsp;最后修改时间：<span id="courseModificationTime"></span></div>
                </div>
            </div>
            <div class="content">
                <ul class="nav nav-tabs" role="tablist">

                    <li role="presentation" class="active">
                        <a aria-controls="labs" role="tab" data-toggle="tab" id="experimentalReportTitle">实验报告题目</a>
                    </li>
                </ul>
                <div class="tab-content">

                    <div role="tabpanel" class="tab-pane active" id="labs">
                        正在加载，请稍后...

                    </div>
                    <div role="tabpanel" class="tab-pane course-comment" id="comments">
                        <div class="comment-box">
                            <div class="comment-form">

                                <div class="comment-form-unlogin">
                                    请
                                    <a href="#sign-modal" data-toggle="modal" data-sign="signin" data-next="/courses/1"> 登录 </a>
                                    后发表评论
                                </div>

                            </div>
                            <div class="comment-title">最新评论</div>
                            <div class="comment-list">
                            </div>
                            <div class="pagination-container"></div>
                        </div>
                    </div>
                    <div role="tabpanel" class="tab-pane" id="reports">
                        <span class="lab-id active" data-lab-id="None">全部</span>

                        <span class="lab-id" data-lab-id="1">第1节</span>

                        <span class="lab-id" data-lab-id="2">第2节</span>

                        <span class="lab-id" data-lab-id="3">第3节</span>

                        <span class="lab-id" data-lab-id="59">第4节</span>

                        <span class="lab-id" data-lab-id="60">第5节</span>

                        <span class="lab-id" data-lab-id="61">第6节</span>

                        <span class="lab-id" data-lab-id="62">第7节</span>

                        <span class="lab-id" data-lab-id="1917">第8节</span>

                        <span class="lab-id" data-lab-id="1918">第9节</span>

                        <span class="lab-id" data-lab-id="63">第10节</span>

                        <span class="lab-id" data-lab-id="337">第11节</span>

                        <span class="lab-id" data-lab-id="346">第12节</span>

                        <span class="lab-id" data-lab-id="354">第13节</span>

                        <span class="lab-id" data-lab-id="356">第14节</span>

                        <span class="lab-id" data-lab-id="1943">第15节</span>

                        <span class="lab-id" data-lab-id="1944">第16节</span>

                        <span class="lab-id" data-lab-id="1945">第17节</span>

                        <div class="report-owner">
                            <span class="owner-list" data-user-id="">我的报告</span> / <span class="owner-list active" data-user-id="None">所有报告</span>
                        </div>
                        <div class="row report-items"></div>
                        <div class="pagination-container"></div>
                    </div>
                    <div role="tabpanel" class="tab-pane" id="questions">
                        <a class="btn btn-success" data-toggle="modal" data-target="#askquestion">我要提问</a>
                        <hr>
                        <ul class="row question-items"></ul>
                        <div class="pagination-container"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-3 layout-side">

            <div class="side-image side-image-pc">
                <img src="../img/ncn1.jpg?imageView2/0/h/300" id="courseImg">
            </div>
            <div class="sidebox mooc-teacher">
                <div class="sidebox-header mooc-header">
                    <h4 class="sidebox-title">课程教师</h4>
                </div>
                <div class="sidebox-body mooc-content">
                    <a>
                        <img src="../img/Linux&c.png">
                    </a>
                    <div class="mooc-info">
                        <div class="name"><strong id="courseTeacher">----</strong> </div>

                        <div class="courses">共发布过<strong id="coursesCount">--</strong>门课程</div>
                    </div>
                </div>
                <div class="sidebox-footer mooc-footer">
                    <a href="" target="_blank" id="teacherCoursesUrl">查看老师的所有课程 ></a>
                </div>
            </div>
            <script type="text/javascript">
                function setSubmitScore(data) {
                    document.getElementsByName("SCORE")[0].value = data;
                };
                function uploadExperimentalReportScore() {
                    var score = document.getElementById("submit-score-number").value;
                    var comment = document.getElementById("submit-comment").value;
                    // alert(score+comment);
                    if(score == ""||score == null){
                        alert("分数不能为空");
                    }
                    else{
                        var formData = new FormData($('#submit-score')[0]);
                        var experimentalId = window.location.href.split("?")[1].split("&")[2].split("=")[1];
                        alert(experimentalId)
                        formData.append("Id",experimentalId);
                        $.ajax({
                            type: "POST",
                            url: "/upload_experimental_report_score",
                            // async: false,//true表示同步，false表示异步
                            cache: false,//设置不缓存
                            data: formData,
                            contentType: false,//必须设置false才会自动加上正确的Content-Tyoe
                            processData: false,//必须设置false才避开jquery对formdata的默认处理，XMLHttpRequest会对formdata进行正确的处理
                            success: uploadExperimentalReportScoreSubmitSuccess,
                            error: function (XMLHttpRequest, textStatus, errorThrown) {
                                if (XMLHttpRequest.status >= 400 && XMLHttpRequest.status < 500) {
                                    alert("客户端请求出错！错误代码（" + XMLHttpRequest.status + "," + XMLHttpRequest.readyState + "," + textStatus + "）");
                                } else {
                                    if (XMLHttpRequest.status >= 500 || XMLHttpRequest.status <= 600) {
                                        alert("服务器出错！错误代码（" + XMLHttpRequest.status + "," + XMLHttpRequest.readyState + "," + textStatus + "）");
                                    } else {
                                        if (XMLHttpRequest.status >= 300 || XMLHttpRequest.status < 400) {
                                            alert("重定向问题！错误代码（" + XMLHttpRequest.status + "," + XMLHttpRequest.readyState + "," + textStatus + "）");
                                        } else {
                                            alert("抱歉，系统好像出现一些异常！错误代码（" + XMLHttpRequest.status + "," + XMLHttpRequest.readyState + "," + textStatus + "）");
                                        }
                                    }
                                }
                                // alert(XMLHttpRequest.status);
                                // alert(XMLHttpRequest.readyState);
                                // alert(textStatus);
                            }
                        });
                    }
                };
                function uploadExperimentalReportScoreSubmitSuccess() {
                    alert("提交成功");
                };
            </script>
            <div class="sidebox mark-experimental">
                <div class="sidebox-header">
                    批改这篇实验报告
                </div>
                <div class="sidebox-body other">
                    <li class="score dropdown" >
                        <a data-toggle="dropdown" href="#" class="dropdown-toggle">选择分数
                            <b class="caret"></b></a>
                        <ul class="dropdown-menu score-number" >
                            <li><a  onclick="setSubmitScore('100')">100</a> </li>
                            <li><a  onclick="setSubmitScore('90')">90</a> </li>
                            <li><a  onclick="setSubmitScore('80')">80</a> </li>
                            <li><a  onclick="setSubmitScore('70')">70</a> </li>
                            <li><a  onclick="setSubmitScore('60')">60</a> </li>
                        </ul>
                    </li>
                    <li >详细评价
                        <form   id="submit-score" method="post" style="padding: 10px">
                            <div class="input-group">
                                <span class="input-group-addon">请输入分数:</span>
                                <input id="submit-score-number"  name="SCORE" class="form-control" value=""/>
                            </div>
                            <div class="input-group">
                                <span class="input-group-addon">请输入评价:</span>
                                <input id="submit-comment" type="text" name="comment" style="width: 100%;height: 30px" class="form-control" value="" />
                            </div>
                        </form>
                        <button  class="btn btn-primary " type="button"  onclick="uploadExperimentalReportScore()"  style="margin: 10px">提交</button>
                    </li>
                </div>
            </div>
            <div class="sidebox adv-course">
                <div class="sidebox-header">
                    <h4 class="sidebox-title">实验报告列表</h4>
                </div>
                <div class="sideobx-body course-content" id="experimentalReportList">
                    正在加载，请稍后...
                </div>
            </div>
        </div>
    </div>
</div>

<!--网页登录弹窗-->
<script src="../model/loginHtml.js"></script>
<!--网页底部  导航栏-->
<script src="../model/bottomExpectIndex.js"></script>

<!--引入js-->
<script src="../app/dest/lib/lib.js?=2016121272249"></script>
<script src="../static/jquery/2.2.4/jquery.min.js"></script>

<script src="../static/ace/1.2.5/ace.js"></script>
<script src="../static/aliyun/aliyun-oss-sdk-4.3.0.min.js"></script>
<script src="../static/highlight.js/9.8.0/highlight.min.js"></script>
<script src="../static/jspdf/1.2.61/jspdf.min.js"></script>
<script src="../static/plupload/2.1.9/js/plupload.full.min.js"></script>
<script src="../static/zeroclipboard/2.2.0/ZeroClipboard.min.js"></script>
<script src="../static/videojs/video.min.js"></script>
<script src="../static/bootstrap-tour/0.11.0/js/bootstrap-tour.min.js"></script>
<script src="../static/bootstrap-table/1.11.0/bootstrap-table.min.js"></script>
<script src="../static/bootstrap-table/1.11.0/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="../static/bootstrap-table/1.11.0/extensions/filter-control/bootstrap-table-filter-control.min.js"></script>

<script src="../static/ravenjs/3.7.0/raven.min.js"></script>
<script src="../app/dest/course/labs.js?=2016121272249"></script>

<!--wangEditor富文本编辑器-->
<script type="text/javascript" src="../wangEditor-3.0.15/release/wangEditor.min.js"></script>
<script src="js/index.js"></script>
<script src="js/show_experimental_report_information.js"></script>

</body>
</html>
